﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace Wamm.ApplicationExceptions {
    public class RuleViolationForModel {
        private static readonly Expression<Func<object, object>> ThisObject = x => x;

        public static void Error(IList<RuleViolation> errors, string message) {
            errors.Add(new RuleViolation { Property = ThisObject, Message = message });
        }
    }
}
